import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/hear',
    name: 'Hear',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Hear')
  },
  {
    path: '/movement',
    name: 'Movement',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Movement')
  },
  {
    path: '/joy',
    name: 'Joy',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Joy')
  },
  {
    path: '/talk',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Talk/index.vue'),
    children: [
      {
        path: '',
        name: 'TalkInternet',
        component: () => import('../views/Talk/TalkInternet.vue'),
      }, {
        path: 'talkaudition',
        name: 'TalkAudition',
        component: () => import('../views/Talk/TalkAudition.vue'),
      }, {
        path: 'talkfact',
        name: 'TalkFact',
        component: () => import('../views/Talk/TalkFact.vue'),
      }, {
        path: 'talktour',
        name: 'TalkTour',
        component: () => import('../views/Talk/TalkTour.vue'),
      }, {
        path: 'talkfood',
        name: 'TalkFood',
        component: () => import('../views/Talk/TalkFood.vue'),
      }, {
        path: 'talklive',
        name: 'TalkLive',
        component: () => import('../views/Talk/TalkLive.vue'),
      }, {
        path: 'talknumerical',
        name: 'TalkNumerical',
        component: () => import('../views/Talk/TalkNumerical.vue'),
      }, {
        path: 'talkscooter',
        name: 'TalkScooter',
        component: () => import('../views/Talk/TalkScooter.vue'),
      },
    ]
  },
  {
    path: '/travelnotes',
    name: 'TravelNotes',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/TravelNotes')
  },
  {
    path: '/photography',
    name: 'Photography',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Photography')
  }, {
    path: '/eslite',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Eslite/index.vue'),
    children: [
      {
        path: '',
        name: 'EsliteAll',
        component: () => import('../views/Eslite/EsliteAll.vue'),
      }, {
        path: 'eslitedecorate',
        name: 'EsliteDecorate',
        component: () => import('../views/Eslite/EsliteDecorate.vue'),
      }, {
        path: 'esliteheadset',
        name: 'EsliteHeadset',
        component: () => import('../views/Eslite/EsliteHeadset.vue'),
      }, {
        path: 'eslitemug',
        name: 'EsliteMug',
        component: () => import('../views/Eslite/EsliteMug.vue'),
      }, {
        path: 'eslitewallet',
        name: 'EsliteWallet',
        component: () => import('../views/Eslite/EsliteWallet.vue'),
      }, {
        path: 'esliteparticulars',
        name: 'EsliteParticulars',
        component: () => import('../views/Eslite/EsliteParticulars.vue'),
      },
    ]
  }, {
    path: '/blueberryjam',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/BlueberryJam/index.vue'),
    children: [
      {
        path: '',
        name: 'AllGroup',
        component: () => import('../views/BlueberryJam/AllGroup.vue'),
      }, {
        path: 'gotgroup',
        name: 'HotGroup',
        component: () => import('../views/BlueberryJam/HotGroup.vue'),
        meta: {
          isLogin: true
        }
      }, {
        path: 'recommendgroup',
        name: 'RecommendGroup',
        component: () => import('../views/BlueberryJam/RecommendGroup.vue'),
      }, {
        path: 'detailpage/:name',
        props: true,
        name: 'DetailPage',
        component: () => import('../views/BlueberryJam/DetailPage.vue'),
      },
    ]
  }, {
    path: '/community',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Community/index.vue'),
    children: [
      {
        path: '',
        name: 'CommunityMovement',
        component: () => import('../views/Community/CommunityMovement.vue'),
      }, {
        path: 'communityhear',
        name: 'CommunityHear',
        component: () => import('../views/Community/CommunityHear.vue'),
      }, {
        path: 'communitytalk',
        name: 'CommunityTalk',
        component: () => import('../views/Community/CommunityTalk.vue'),
      }, {
        path: 'communityjoy',
        name: 'CommunityJoy',
        component: () => import('../views/Community/CommunityJoy.vue'),
      }, {
        path: 'communitytravelnotes',
        name: 'CommunityTravelNotes',
        component: () => import('../views/Community/CommunityTravelNotes.vue'),
      }, {
        path: 'communityphotograph',
        name: 'CommunityPhotograph',
        component: () => import('../views/Community/CommunityPhotograph.vue'),
      }, {
        path: 'communityexchange',
        name: 'CommunityExchange',
        component: () => import('../views/Community/CommunityExchange.vue'),
      }
    ]
  }, {
    path: '/login',
    name: 'Login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Login/Login.vue'),
  }, {
    path: '/sign',
    name: 'Sign',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Login/Sign.vue'),
  }, {
    path: '/userinfo',
    component: () => import('../views/User/UserInfo.vue'),
    children: [
      {
        path: '/usercommunity',
        name: 'UserCommunity',
        component: () => import('../views/User/UserCommunity.vue'),
      }, {
        path: '/userenshrine',
        name: 'UserEnshrine',
        component: () => import('../views/User/UserEnshrine.vue'),
      }, {
        path: '/userinvitation',
        name: 'UserInvitation',
        component: () => import('../views/User/UserInvitation.vue'),
      }, {
        path: '/userset',
        name: 'UserSet',
        component: () => import('../views/User/UserSet.vue'),
      }, {
        path: '/setpersonaldata',
        name: 'SetPersonalData',
        component: () => import('../views/User/SetPersonalData.vue'),
      }, {
        path: '/userattention',
        name: 'UserAttention',
        component: () => import('../views/User/UserAttention.vue'),
      }, {
        path: '/usergroup',
        name: 'UserGroup',
        component: () => import('../views/User/UserGroup.vue'),
      }, {
        path: '/usermsg',
        name: 'UserMsg',
        component: () => import('../views/User/UserMsg.vue'),
      }, {
        path: '/useronattention',
        name: 'UserOnAttention',
        component: () => import('../views/User/UserOnAttention.vue'),
      }
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
